package com.tanhan.mindapp.exception;

// 自定义错误枚举类
public enum AppExceptionCodeMsg {

    // 枚举自定义错误类型
    NOT_FOUND_USER(1004, "用户名或密码错误"),
    NOT_UPLOAD_IMG(1003, "图片上传失败"),
    NOT_MAX_IMG(1003, "图片限制上传10MB"),
    NOT_LOGIN(403, "当前未登录, 请先进行登录"),
    TOKEN_EXPIRED(403, "登录已过期, 请重新登陆"),
    USER_ALREADY_EXISTS(1002, "用户已存在"),
    ;

    private int code;
    private String msg;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }


    AppExceptionCodeMsg(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}